/*
 * BanBu_addTongxunluCell
 * @description 本文件提供通讯录列表的自定制的cell
 * @package
 * @author 		yinlinlin
 * @copyright
 * @version 		***
 * @description 本文件提供通讯录列表的自定制的cell
 */

#import "BanBu_addTongxunluCell.h"

@implementation BanBu_addTongxunluCell
{
    UIImageView * _lineImgV;
    UIButton * _inviteBu;
}

- (void)dealloc
{
    _inviteBu = nil;
    [_lineImgV release];
    _lineImgV = nil;
    self.pressedBuCallBack = nil;
    [super dealloc];
}
- (void)awakeFromNib {
    // Initialization code
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        _lineImgV = [[UIImageView alloc]initWithFrame:CGRectMake(20, 46.5, 300, 0.5)];
        _lineImgV.image = [UIImage imageNamed:@"addline.png"];
        [self.contentView addSubview:_lineImgV];
        _inviteBu = [UIButton buttonWithType:UIButtonTypeCustom];
        [_inviteBu setFrame:CGRectMake(250, 10, 60, 27)];
        [_inviteBu setTitle:NSLocalizedString(@"invite", nil) forState:UIControlStateNormal];
        [_inviteBu setTitleColor:UIColorWithRGB(41, 111, 183, 1.0) forState:UIControlStateNormal];
        _inviteBu.titleLabel.font = [UIFont systemFontOfSize:14.0];
        NSString * namePath = [[NSBundle mainBundle] pathForResource:@"add_invite" ofType:@"png"];
        UIImage * BubackImg = [[UIImage imageWithContentsOfFile:namePath] resizableImageWithCapInsets:UIEdgeInsetsMake(11, 12, 11, 12)];
        [_inviteBu setBackgroundImage:BubackImg forState:UIControlStateNormal];
        [self.contentView addSubview:_inviteBu];
        [_inviteBu addTarget:self action:@selector(pressedBu) forControlEvents:UIControlEventTouchUpInside];
    }
    return self;
}

- (void)pressedBu
{
    if (_pressedBuCallBack)
    {
        _pressedBuCallBack();
    }
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
